package reflection;

public class Test06 {
    static {
        System.out.println("main加载");
    }
    public static void main(String[] args) throws ClassNotFoundException {
//        Son son = new Son();
//        Class.forName("reflection.Son");
//        System.out.println(Son.b);
//        Son[] sons = new Son[5];
        System.out.println(Son.M);
    }
}
class Father{
    static int b = 2;
    static{
        System.out.println("父类被加载");
    }
}
class Son extends Father{
    static{
        m=300;
        System.out.println("子类被加载");
    }

    static int m = 100;
    static final int M = 1;
}
